package com.czl.elm.util;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor

public class ActionResult {
    private long code;
    private String message;
    private Object obj;

    public static ActionResult success(String message){
        return new ActionResult(200,message,null);
    }

    public static ActionResult success(String message,Object obj){
        return new ActionResult(200,message,obj);
    }

    public static ActionResult error(String message){
        return new ActionResult(500,message,null);
    }

    public static ActionResult error(String message,Object obj){
        return new ActionResult(500,message,obj);
    }
}
